package com.slkj.shilixiaoyuanapp.net.service;

import com.slkj.shilixiaoyuanapp.entity.ToolCommonHistoryEntity;
import com.slkj.shilixiaoyuanapp.entity.parent.AddExerciseEntity;
import com.slkj.shilixiaoyuanapp.entity.parent.AskLeaveRecordEntity;
import com.slkj.shilixiaoyuanapp.entity.parent.BodyartspecialtyEntity;
import com.slkj.shilixiaoyuanapp.entity.parent.ChangeChildEntity;
import com.slkj.shilixiaoyuanapp.entity.parent.ChangeRoleEntity;
import com.slkj.shilixiaoyuanapp.entity.parent.ExerciseDetailEntity;
import com.slkj.shilixiaoyuanapp.entity.parent.ExerciseHistoryEntity;
import com.slkj.shilixiaoyuanapp.entity.parent.ExerciseTypeEntity;
import com.slkj.shilixiaoyuanapp.entity.parent.SchoolActivitysDetailEntity;
import com.slkj.shilixiaoyuanapp.entity.parent.SingleBodyartspecialtyEntity;
import com.slkj.shilixiaoyuanapp.entity.parent.StudentCheckEntity;
import com.slkj.shilixiaoyuanapp.entity.parent.StudentInfoEntity;
import com.slkj.shilixiaoyuanapp.net.CommonResult;

import java.util.List;

import io.reactivex.Observable;

import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;

/**
 * 作者：何磊 on 2018/10/11 15:49
 * 描述：家长端接口
 */
public interface ParentService {
    /**
     * 学生请假
     *
     * */
    @FormUrlEncoded
    @POST("auditMaterialLeave/add.do")
    Observable<CommonResult<String>> studentAskforLeave(@Field("studentId") int studentId, @Field("classId") int classId, @Field("type") int type, @Field("startTime") String startTime, @Field("endTime") String endTime, @Field("dateSize") float dateSize, @Field("image") String image,@Field("body") String body);

    /**
     * 单个请假记录
     *
     * */
    @FormUrlEncoded
    @POST("auditMaterialLeave/getDetails.do")
    Observable<CommonResult<AskLeaveRecordEntity>> getAskLeaveRecord(@Field("id") int id);

    /**
     * 催办
     *
     * */
    @FormUrlEncoded
    @POST("auditMaterialLeave/updateUrge.do")
    Observable<CommonResult<String>> CuiBan(@Field("classId") int classId,@Field("id") int id);

    /**
     * 撤销请假
     *
     * */
    @FormUrlEncoded
    @POST("auditMaterialLeave/deleteByIdleave.do")
    Observable<CommonResult<String>> withDrawLeave(@Field("id") int id);

    /**
     * 体艺特长
     *
     *
     * */
    @GET("auditMaterialAward/art.do")
    Observable<CommonResult<BodyartspecialtyEntity>> getBodyartspecialty();

    /**
     * 添加体艺特长
     *
     * */
    @FormUrlEncoded
    @POST("auditMaterialAward/add.do")
    Observable<CommonResult<String>> addBodyartspecialty(@Field("studentId") int studentId,@Field("classId") int classId,@Field("hostUnit") String hostUnit,@Field("name") String name,@Field("lId") int LId,@Field("aId") int aId,@Field("prizeTime") String prizeTime,@Field("bigType") int bigType,@Field("id") int id,@Field("auditor") String auditor,@Field("image") String image);

    /**
     * 单个体艺记录
     *
     * */
    @FormUrlEncoded
    @POST("auditMaterialAward/getDetails.do")
    Observable<CommonResult<SingleBodyartspecialtyEntity>> getSingleBodyartspecialty(@Field("id") int id);

    /**
     * 撤销体艺特长
     *
     * */
    @FormUrlEncoded
    @POST("auditMaterialAward/deleteByIdAward.do")
    Observable<CommonResult<String>> withDrawBodySpecialty(@Field("id") int id);

    /**
     * 切换孩子
     *
     * */
    @FormUrlEncoded
    @POST("home/changeUser.do")
    Observable<CommonResult<ChangeRoleEntity>> changeUser(@Field("shchoolId") int schoolId, @Field("childId") int childId, @Field("role") int role);

    /**
     * 分页加载获取行政工具通用历史记录
     * @param page
     * @param count
     * @param state
     * @param type
     * @return
     */
    @FormUrlEncoded
    @POST("auditMaterial/getAudit.do")
    Observable<CommonResult<List<ToolCommonHistoryEntity>>> getCommonHistory(@Field("studentId") int studentId,@Field("page") int page, @Field("count") int count, @Field("state") String state, @Field("type") int type,@Field("startId") int startId);

    /**
     * 获取平时锻炼类型
     *
     * */
    @GET("exercise/exerciseType.do")
    Observable<CommonResult<List<ExerciseTypeEntity>>> getExerciseType();

    /**
     * 添加平时锻炼
     *
     * */
    @FormUrlEncoded
    @POST("exercise/add.do")
    Observable<CommonResult<String>> addExercise(@Field("stuId") int stuId,@Field("classId") int classId,@Field("list") String list);

    /**
     * 平时锻炼历史记录
     *
     * */
    @FormUrlEncoded
    @POST("exercise/selectExerciseRecord.do")
    Observable<CommonResult<List<ExerciseHistoryEntity>>> getExerciseHistory(@Field("stuId") int stuId,@Field("classId") int classId,@Field("page") int page,@Field("count") int count);

    /**
     * 校外活动
     *
     * */
    @FormUrlEncoded
    @POST("moraCharacter/addByStudent.do")
    Observable<CommonResult<String>> addSchoolActivitys(@Field("studentId") int studentId,@Field("title") String title,@Field("address") String address,@Field("activityTime") String activityTime,@Field("type") int type,@Field("summary") String summary,@Field("image") String image,@Field("duration") double duration,@Field("auditor") String auditor);

    /**
     * 校外活动详情
     *
     * */
    @FormUrlEncoded
    @POST("moraCharacter/getByStudent.do")
    Observable<CommonResult<SchoolActivitysDetailEntity>> schoolActivitysDetail(@Field("id") int id,@Field("studentId") int studentId);

    /**
     * 校外活动详情
     *
     * */
    @FormUrlEncoded
    @POST("moraCharacter/getByStudent.do")
    Observable<CommonResult<SchoolActivitysDetailEntity>> shSchoolActivitysDetail(@Field("id") int id);

    /**
     * 平时锻炼详情
     *
     * */
    @FormUrlEncoded
    @POST("exercise/selectByStuId.do")
    Observable<CommonResult<ExerciseDetailEntity>> getExerciseDetail(@Field("stuId") int stuId,@Field("classId") int classId,@Field("id") int id);

    /**
     * 查看学生信息
     *
     * */
    @FormUrlEncoded
    @POST("PersonalCenter/studentInformation.do")
    Observable<CommonResult<StudentInfoEntity>> getStudentInfo(@Field("stuId") int stuId);

    /**
     * 修改学生头像
     *
     * */
    @FormUrlEncoded
    @POST("PersonalCenter/updateHeadImg.do")
    Observable<CommonResult<String>> updateHeadImg( @Field("image") String img,@Field("stuId") int stuId);

    /**
     * 学生考勤
     *
     * */
    @FormUrlEncoded
    @POST("PersonalCenter/selectCheckinginStudent.do")
    Observable<CommonResult<StudentCheckEntity>> studentCheck(@Field("dates") String dates, @Field("stuId") int stuId);
}
